using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ServerTools
{
    /// <summary>
    /// <para>Generate Map Server Cache</para>
    /// <para>Generates pre-rendered tile cache for the map server.</para>
    /// <para>为地图服务器生成预渲染的切片缓存。</para>
    /// </summary>    
    [DisplayName("Generate Map Server Cache")]
    public class GenerateMapServerCache : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public GenerateMapServerCache()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_server_name">
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_object_name">
        /// <para>Map Server</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_data_frame">
        /// <para>Data Frame</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_out_folder">
        /// <para>Service Cache Directory</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_tiling_scheme_type">
        /// <para>Tiling Scheme</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_scales_type">
        /// <para>Scales</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_num_of_scales">
        /// <para>Number of Scales</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_dpi">
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_tile_width">
        /// <para>Tile Width (in pixels)</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        /// <param name="_tile_height">
        /// <para>Tile Height (in pixels)</para>
        /// <para></para>
        /// <para></para>
        /// </param>
        public GenerateMapServerCache(object _server_name, object _object_name, object _data_frame, object _out_folder, _tiling_scheme_type_value _tiling_scheme_type, _scales_type_value _scales_type, long? _num_of_scales, long _dpi, long _tile_width, long _tile_height)
        {
            this._server_name = _server_name;
            this._object_name = _object_name;
            this._data_frame = _data_frame;
            this._out_folder = _out_folder;
            this._tiling_scheme_type = _tiling_scheme_type;
            this._scales_type = _scales_type;
            this._num_of_scales = _num_of_scales;
            this._dpi = _dpi;
            this._tile_width = _tile_width;
            this._tile_height = _tile_height;
        }
        public override string ToolboxName => "Server Tools";

        public override string ToolName => "Generate Map Server Cache";

        public override string CallName => "server.GenerateMapServerCache";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_server_name, _object_name, _data_frame, _out_folder, _tiling_scheme_type.GetGPValue(), _scales_type.GetGPValue(), _num_of_scales, _dpi, _tile_width, _tile_height, _map_or_layers.GetGPValue(), _tiling_schema, _tile_origin, _levels, _Layer, _thread_count, _Antialiasing.GetGPValue(), _cache_format.GetGPValue(), _tile_compression_quality, _out_server_name, _out_object_name];

        /// <summary>
        /// <para>Host</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Host")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _server_name { get; set; }


        /// <summary>
        /// <para>Map Server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Map Server")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _object_name { get; set; }


        /// <summary>
        /// <para>Data Frame</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Data Frame")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _data_frame { get; set; }


        /// <summary>
        /// <para>Service Cache Directory</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Service Cache Directory")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_folder { get; set; }


        /// <summary>
        /// <para>Tiling Scheme</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _tiling_scheme_type_value _tiling_scheme_type { get; set; }

        public enum _tiling_scheme_type_value
        {
            /// <summary>
            /// <para>NEW</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NEW")]
            [GPEnumValue("NEW")]
            _NEW,

            /// <summary>
            /// <para>PREDEFINED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PREDEFINED")]
            [GPEnumValue("PREDEFINED")]
            _PREDEFINED,

        }

        /// <summary>
        /// <para>Scales</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _scales_type_value _scales_type { get; set; }

        public enum _scales_type_value
        {
            /// <summary>
            /// <para>STANDARD</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("STANDARD")]
            [GPEnumValue("STANDARD")]
            _STANDARD,

            /// <summary>
            /// <para>CUSTOM</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("CUSTOM")]
            [GPEnumValue("CUSTOM")]
            _CUSTOM,

        }

        /// <summary>
        /// <para>Number of Scales</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of Scales")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _num_of_scales { get; set; }


        /// <summary>
        /// <para>Dots(Pixels) Per Inch</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dots(Pixels) Per Inch")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _dpi { get; set; }


        /// <summary>
        /// <para>Tile Width (in pixels)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Width (in pixels)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _tile_width { get; set; }


        /// <summary>
        /// <para>Tile Height (in pixels)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Height (in pixels)")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long _tile_height { get; set; }


        /// <summary>
        /// <para>Cache Type</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cache Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _map_or_layers_value _map_or_layers { get; set; } = _map_or_layers_value._FUSED;

        public enum _map_or_layers_value
        {
            /// <summary>
            /// <para>FUSED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("FUSED")]
            [GPEnumValue("FUSED")]
            _FUSED,

            /// <summary>
            /// <para>MULTI_LAYER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("MULTI_LAYER")]
            [GPEnumValue("MULTI_LAYER")]
            _MULTI_LAYER,

        }

        /// <summary>
        /// <para>Predefined Tiling Scheme</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Predefined Tiling Scheme")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tiling_schema { get; set; } = null;


        /// <summary>
        /// <para>Tiling origin in map units</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tiling origin in map units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _tile_origin { get; set; } = null;


        /// <summary>
        /// <para>Scales</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Scales")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _levels { get; set; } = null;


        /// <summary>
        /// <para>Input Layers</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Layers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _Layer { get; set; } = null;


        /// <summary>
        /// <para>Number of caching service instances</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Number of caching service instances")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long? _thread_count { get; set; } = null;


        /// <summary>
        /// <para>Antialiasing (Smoothes edges of labels and lines for improved display quality)</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Antialiasing (Smoothes edges of labels and lines for improved display quality)")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _Antialiasing_value _Antialiasing { get; set; } = _Antialiasing_value._false;

        public enum _Antialiasing_value
        {
            /// <summary>
            /// <para>ANTIALIASING</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ANTIALIASING")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>NONE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("NONE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Cache Tile Format</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cache Tile Format")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _cache_format_value _cache_format { get; set; } = _cache_format_value._PNG24;

        public enum _cache_format_value
        {
            /// <summary>
            /// <para>PNG8</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PNG8")]
            [GPEnumValue("PNG8")]
            _PNG8,

            /// <summary>
            /// <para>PNG24</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PNG24")]
            [GPEnumValue("PNG24")]
            _PNG24,

            /// <summary>
            /// <para>PNG32</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PNG32")]
            [GPEnumValue("PNG32")]
            _PNG32,

            /// <summary>
            /// <para>JPEG</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("JPEG")]
            [GPEnumValue("JPEG")]
            _JPEG,

        }

        /// <summary>
        /// <para>Tile Compression Quality</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tile Compression Quality")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public long _tile_compression_quality { get; set; } = 0;


        /// <summary>
        /// <para>Output Host</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Host")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_server_name { get; set; }


        /// <summary>
        /// <para>Output Map Server</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Map Server")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_object_name { get; set; }


        public GenerateMapServerCache SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}